//
//  M1LoginJump.m
//  NewMarryU
//
//  Created by apple on 2018/7/20.
//  Copyright © 2018年 Cedar. All rights reserved.
//

#import "M1LoginJump.h"
#import "M1LoginVC.h"
#import "M1RealNameViewController.h"
#import "M1CerViewController.h"
#import "M1WsInfoViewController.h"
@implementation M1LoginJump
+(void)m1_loginWith:(M1User *)user vc:(UIViewController *)vc{
    M1BaseViewController *m1_vc;
    [MobClick profileSignInWithPUID:user.basic.uid];
    if (user.status.info_status !=1){
        m1_vc = [[M1WsInfoViewController alloc]init];
    }else if (user.status.auth_fees_status !=1){
        m1_vc = [[M1CerViewController alloc]init];
    }else if (user.status.identity_status!=1) {
        m1_vc = [[M1RealNameViewController alloc]init];
    }
    if (m1_vc) {
        if (vc) {
            [vc.navigationController pushViewController:m1_vc animated:YES];
        }else{
            M1ShuntVC *m1_shuntVC = [M1ShuntVC new];
            m1_shuntVC.m1_changeNavTitleColor = YES;
            M1NavigationController *m1_nav = [[M1NavigationController alloc]initWithRootViewController:m1_shuntVC];
            [UIApplication sharedApplication].delegate.window.rootViewController = m1_nav;
            [m1_nav pushViewController:m1_vc animated:NO];
        }
    }else{
        [M1User m1_uploadInfo:^(M1User *user) {
            
        }];
        [UIApplication sharedApplication].delegate.window.rootViewController = [M1TabBarController new];
    }
}
@end
